package com.woniu.apartment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.woniu.apartment.mapper.ExchangeRateMapper;
import com.woniu.apartment.domain.ExchangeRate;
import com.woniu.apartment.service.IExchangeRateService;

/**
 * 汇率Service业务层处理
 * 
 * @author yy
 * @date 2023-04-03
 */
@Service
public class ExchangeRateServiceImpl implements IExchangeRateService 
{
    @Autowired
    private ExchangeRateMapper exchangeRateMapper;

    /**
     * 查询汇率
     * 
     * @param id 汇率主键
     * @return 汇率
     */
    @Override
    public ExchangeRate selectExchangeRateById(Long id)
    {
        return exchangeRateMapper.selectExchangeRateById(id);
    }

    /**
     * 查询汇率列表
     * 
     * @param exchangeRate 汇率
     * @return 汇率
     */
    @Override
    public List<ExchangeRate> selectExchangeRateList(ExchangeRate exchangeRate)
    {
        return exchangeRateMapper.selectExchangeRateList(exchangeRate);
    }

    /**
     * 新增汇率
     * 
     * @param exchangeRate 汇率
     * @return 结果
     */
    @Override
    public int insertExchangeRate(ExchangeRate exchangeRate)
    {
        return exchangeRateMapper.insertExchangeRate(exchangeRate);
    }

    /**
     * 修改汇率
     * 
     * @param exchangeRate 汇率
     * @return 结果
     */
    @Override
    public int updateExchangeRate(ExchangeRate exchangeRate)
    {
        return exchangeRateMapper.updateExchangeRate(exchangeRate);
    }

    /**
     * 批量删除汇率
     * 
     * @param ids 需要删除的汇率主键
     * @return 结果
     */
    @Override
    public int deleteExchangeRateByIds(Long[] ids)
    {
        return exchangeRateMapper.deleteExchangeRateByIds(ids);
    }

    /**
     * 删除汇率信息
     * 
     * @param id 汇率主键
     * @return 结果
     */
    @Override
    public int deleteExchangeRateById(Long id)
    {
        return exchangeRateMapper.deleteExchangeRateById(id);
    }
}
